textview: Fix memory handling
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Oct 2017 03:06:52 +0000 (23:06 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Oct 2017 03:06:52 +0000 (23:06 -0400)
When cleaning up the text appearance struct, we forgot
to add the new strikethrough_rgba member to the copy
function.

gtk/gtktextlayout.c

index 75c37a583b2e27c71078d271dffe263b9e0ae747..564d1be8c8b5eb1f09574ad355edad0b5155e16c 100644 (file)
@@ -1549,6 +1549,9 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
   if (appearance->underline_rgba)
     result->appearance.underline_rgba = gdk_rgba_copy (appearance->underline_rgba);
 
+  if (appearance->strikethrough_rgba)
+    result->appearance.strikethrough_rgba = gdk_rgba_copy (appearance->strikethrough_rgba);
+
   return (PangoAttribute *)result;
 }